{extend name="public/base" /}
{block name="title"}会员列表{/block}

{block name="content"}
<script language="javascript" type="text/javascript" src="<?php echo http_host(); ?>/js/My97DatePicker/WdatePicker.js"></script>

<h2 class="sub-header">会员列表 <small class="badge"><?php echo $list->total(); ?> 人</small></h2>
<div>[ <a href="<?php echo url('user/add'); ?>">添加会员</a> ] [ <a href="<?php echo url('user_money/index'); ?>">余额记录</a> ] [ <a href="<?php echo url('user_rank/index'); ?>">会员等级</a> ] [ <a href="<?php echo url('user/index'); ?>?is_online=1">在线会员</a> ]</div>

<form id="searcharc" action="{:url('index')}" method="get">
<div class="bg-info" style="margin:10px 0;padding:10px;">
    <div class="form-inline" style="display:inline;float:left;">
        <div class="form-group">
            <label for="order_sn">起止时间:</label>
            <input id="start_date" name="start_date" autocomplete="off" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" size="10" type="text" class="form-control" placeholder="开始时间">
        </div>
        <div class="form-group">
            <label for="name">-</label>
            <input id="end_date" name="end_date" autocomplete="off" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" size="10" type="text" class="form-control" placeholder="结束时间">
        </div>
        <button type="submit" class="btn btn-success">查询</button>

		<div class="form-group" style="margin-left:100px;"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
		<button type="submit" class="btn btn-info" value="Submit">搜索一下</button>
    </div>
    <div style="clear:both;"></div>
</div>
</form>

<form name="listarc"><div class="table-responsive"><table class="table table-striped table-hover">
<thead><tr class="info">
<th>ID</th>
<th>用户名</th>
<th>性别</th>
<th>余额</th>
<th>积分</th>
<th>佣金</th>
<th>注册时间</th>
<th>状态</th>
<th>管理</th>
</tr></thead>
<tbody>
<?php if ($list) { foreach ($list as $row) { ?><tr>
<td><?php echo $row['id']; ?></td>
<td><?php if (!empty($row['head_img'])) { ?><img src="<?php echo $row['head_img']; ?>" style="width:24px;height:24px;" onerror="this.src='<?php echo http_host(); ?>/images/no_pic.jpg'"><?php } ?> <a href="javascript:;" style="<?php if ($row['login_time'] > (time() - 300)) { echo 'color:#f60;'; } ?>"><?php if ($row['user_name']) { echo $row['user_name']; } else { echo $row['mobile']; } ?></a></td>
<td><?php echo $row['sex_text']; ?></td>
<td><?php echo $row['money']; ?></td>
<td><?php echo $row['point']; ?></td>
<td><font color="red"><?php echo $row['commission']; ?></font></td>
<td><?php echo date('Y-m-d H:i:s',$row['add_time']); ?></td>
<td><a href="{:url('index')}?status=<?php echo $row['status']; ?>"><?php echo $row['status_text']; ?></a></td>
<td><a href="<?php echo url('user_money/add').'?user_id='.$row['id']; ?>">人工充值</a> | <a href="<?php echo url('user_money/index').'?user_id='.$row['id']; ?>">余额记录</a> | <a href="<?php echo url('user/edit'); ?>?id=<?php echo $row['id']; ?>">修改</a></td>
</tr><?php }} ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->

<div class="backpages">{$page}</div>
{/block}